package com.nmf.dao.gen;

import com.nmf.dao.gen.bean.BizCompany;
import com.nmf.dao.gen.bean.BizCompanyExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizCompanyMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @SelectProvider(type=BizCompanySqlProvider.class, method="countByExample")
    long countByExample(BizCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @DeleteProvider(type=BizCompanySqlProvider.class, method="deleteByExample")
    int deleteByExample(BizCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @Delete({
        "delete from biz_company",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @Insert({
        "insert into biz_company (id, comp_name, ",
        "comp_address, comp_license_pic, ",
        "contact_name, category_id, ",
        "category_name, contact_tel_no, ",
        "password, contact_job, ",
        "scale, nature, province_id, ",
        "province_name, city_id, ",
        "city_name, create_date, ",
        "update_date)",
        "values (#{id,jdbcType=VARCHAR}, #{compName,jdbcType=VARCHAR}, ",
        "#{compAddress,jdbcType=VARCHAR}, #{compLicensePic,jdbcType=VARCHAR}, ",
        "#{contactName,jdbcType=VARCHAR}, #{categoryId,jdbcType=VARCHAR}, ",
        "#{categoryName,jdbcType=VARCHAR}, #{contactTelNo,jdbcType=VARCHAR}, ",
        "#{password,jdbcType=VARCHAR}, #{contactJob,jdbcType=VARCHAR}, ",
        "#{scale,jdbcType=INTEGER}, #{nature,jdbcType=INTEGER}, #{provinceId,jdbcType=VARCHAR}, ",
        "#{provinceName,jdbcType=VARCHAR}, #{cityId,jdbcType=VARCHAR}, ",
        "#{cityName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateDate,jdbcType=TIMESTAMP})"
    })
    int insert(BizCompany record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @InsertProvider(type=BizCompanySqlProvider.class, method="insertSelective")
    int insertSelective(BizCompany record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @SelectProvider(type=BizCompanySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="comp_name", property="compName", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_address", property="compAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_license_pic", property="compLicensePic", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_id", property="categoryId", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_name", property="categoryName", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_tel_no", property="contactTelNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_job", property="contactJob", jdbcType=JdbcType.VARCHAR),
        @Result(column="scale", property="scale", jdbcType=JdbcType.INTEGER),
        @Result(column="nature", property="nature", jdbcType=JdbcType.INTEGER),
        @Result(column="province_id", property="provinceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_id", property="cityId", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<BizCompany> selectByExample(BizCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @Select({
        "select",
        "id, comp_name, comp_address, comp_license_pic, contact_name, category_id, category_name, ",
        "contact_tel_no, password, contact_job, scale, nature, province_id, province_name, ",
        "city_id, city_name, create_date, update_date",
        "from biz_company",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="comp_name", property="compName", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_address", property="compAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_license_pic", property="compLicensePic", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_id", property="categoryId", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_name", property="categoryName", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_tel_no", property="contactTelNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_job", property="contactJob", jdbcType=JdbcType.VARCHAR),
        @Result(column="scale", property="scale", jdbcType=JdbcType.INTEGER),
        @Result(column="nature", property="nature", jdbcType=JdbcType.INTEGER),
        @Result(column="province_id", property="provinceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_id", property="cityId", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    BizCompany selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @UpdateProvider(type=BizCompanySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizCompany record, @Param("example") BizCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @UpdateProvider(type=BizCompanySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizCompany record, @Param("example") BizCompanyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @UpdateProvider(type=BizCompanySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizCompany record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_company
     */
    @Update({
        "update biz_company",
        "set comp_name = #{compName,jdbcType=VARCHAR},",
          "comp_address = #{compAddress,jdbcType=VARCHAR},",
          "comp_license_pic = #{compLicensePic,jdbcType=VARCHAR},",
          "contact_name = #{contactName,jdbcType=VARCHAR},",
          "category_id = #{categoryId,jdbcType=VARCHAR},",
          "category_name = #{categoryName,jdbcType=VARCHAR},",
          "contact_tel_no = #{contactTelNo,jdbcType=VARCHAR},",
          "password = #{password,jdbcType=VARCHAR},",
          "contact_job = #{contactJob,jdbcType=VARCHAR},",
          "scale = #{scale,jdbcType=INTEGER},",
          "nature = #{nature,jdbcType=INTEGER},",
          "province_id = #{provinceId,jdbcType=VARCHAR},",
          "province_name = #{provinceName,jdbcType=VARCHAR},",
          "city_id = #{cityId,jdbcType=VARCHAR},",
          "city_name = #{cityName,jdbcType=VARCHAR},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizCompany record);
}